How to write an SQL query that retrieves high scores